package com.hengxinguotong.zhihuichengjian.bean;

import com.hengxinguotong.zhihuichengjian.treeview.Node;

import java.io.Serializable;

/**
 * @CopyRight 恒信国通信息科技
 * @Author wulei
 * @Date 2018/4/13
 * 1.进度计划； 2.工程进度。
 */

public class ScheduleBean extends Node<String> implements Serializable {
    private String id,//节点id
            pId,//父节点id
            name,//节点名称
            startTime,//进度计划开始时间
            endTime,//进度计划结束时间
            status;//工程进度状态0：未开始 1：进行中 2已完成
    private float percent;//工程进度百分比
    private int planDays,//工程进度计划天数
            realDays;//工程进度实际天数

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public float getPercent() {
        return percent;
    }

    public void setPercent(float percent) {
        this.percent = percent;
    }

    public int getPlanDays() {
        return planDays;
    }

    public void setPlanDays(int planDays) {
        this.planDays = planDays;
    }

    public int getRealDays() {
        return realDays;
    }

    public void setRealDays(int realDays) {
        this.realDays = realDays;
    }

    @Override
    public String get_id() {
        return id;
    }

    @Override
    public String get_parentId() {
        return pId;
    }

    @Override
    public String get_label() {
        return name;
    }

    @Override
    public String get_startTime() {
        return startTime;
    }

    @Override
    public String get_endTime() {
        return endTime;
    }

    @Override
    public String get_status() {
        return status;
    }

    @Override
    public float get_percent() {
        return percent;
    }

    @Override
    public void set_percent(float percent) {
        this.percent = percent;
    }

    @Override
    public int get_planDays() {
        return planDays;
    }

    @Override
    public int get_realDays() {
        return realDays;
    }

    @Override
    public boolean parent(Node dest) {
        if (id.equals((String)dest.get_parentId())){
            return true;
        }
        return false;
    }

    @Override
    public boolean child(Node dest) {
        if (pId.equals((String) dest.get_id())){
            return true;
        }
        return false;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getpId() {
        return pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
